package com.test;

import com.alibaba.dubbo.demo.Person;
import com.alibaba.dubbo.demo.Teacher;

import feign.Feign;
import feign.jackson.JacksonDecoder;
import feign.jackson.JacksonEncoder2;
import feign.okhttp.OkHttpClient;

public class PostDemo2 {

	public static void main(String[] args) {
		FeignService feignService = Feign.builder()
				.client(new OkHttpClient())
				.encoder(new JacksonEncoder2())
				.decoder(new JacksonDecoder())
				.target(FeignService.class, "http://localhost:8085");
		// 接口在spring-webflux的com.demo.webflux.feigncore里
		Teacher teacher = new Teacher("zsl", "27");
		Person contributor = feignService.contributors3("111", teacher);
		System.out.println(contributor);
	}

}
